﻿<%@ Page Language="C#" %>
<%@ Import Namespace= "System.Collections"%>
<%@ Import Namespace="System.Collections.Generic" %>

<%
    List<DTO.GiamGiaDto> list = BUS.GiamGiaBus.LayDanhSachGiamGia();
    Response.Write("<?xml version='1.0' encoding='utf-8'?>");
    Response.Write("<root>");
    Response.Write("<total>" + list.Count + "</total>");
    Response.Write("<giamgialist>");
    foreach (DTO.GiamGiaDto giam in list)
    {
        Response.Write("<giamgia>");
        Response.Write("<id>" + giam.ID + "</id>");
        Response.Write("<thangdiem>" + giam.ThangDiem + "</thangdiem>");
        Response.Write("<mucgiam>" + giam.MucGiam + "</mucgiam>");
        Response.Write("</giamgia>");
    }
    Response.Write("</giamgialist>");
    Response.Write("</root>");
%>
